#include <cstring>
#include "memorypool.h"

void CMemory::FreeMemory(char* jobinfo)
{
    delete [] (char*)jobinfo;
}

void* CMemory::AllocMemory(int memsize, bool ifMemset)
{
    void* tmpdata = (void *)new char[memsize]; //如果异常，就让程序崩溃
    if (ifMemset)
    {
        memset(tmpdata, 0, memsize);
    }
    return tmpdata;
}
